package org.firstspringdema.dycdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class DycDemoApplication {

    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(DycDemoApplication.class, args);
        UserService userService = applicationContext.getBean(UserService.class);
        UserController userController = applicationContext.getBean(UserController.class);
        userController.printServiceInfo();
        System.out.println("userService bean" + userService.getServiceName());
        System.out.println("DycDemoApplication started");

    }

}
